package org.jeecg.common.modules.doctor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.modules.doctor.entity.DoctorAccountFlow;
import org.jeecg.common.util.enums.AccountFlowTypeEnum;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: doctor_account_flow
 * @Author: jeecg-boot
 * @Date:   2020-08-22
 * @Version: V1.0
 */
public interface IDoctorAccountFlowService extends IService<DoctorAccountFlow> {


    /**
     * 获取账户流水(不分页)
     * @param accountId
     * @return
     */
    List<DoctorAccountFlow> queryFlowByAccountId(String accountId);

    /**
     * 新增一条流水
     * @param accountId  医生账户表主键
     * @param amount     提现金额
     * @param flowType   本次操作的描述和状态
     * @param relationId
     * @return
     */
    DoctorAccountFlow addAccountFlow(String accountId, BigDecimal amount, AccountFlowTypeEnum flowType, String relationId);

    /**
     * 获取指定的流水
     * @param accountId
     * @param accountFlow
     * @param relationId
     * @return
     */
    DoctorAccountFlow getAccountFlow(String accountId,AccountFlowTypeEnum accountFlow,String relationId);
}
